Shim coil design for Halbach magnet by equivalent magnetic dipole method
Wu Jia-Min1, Xu Zheng1, †, Guo Pan2, ‡, Qi Jin-Feng1, He Yu-Cheng1
State Key Laboratory of Power Transmission Equipment and System Security and New Technology, Chongqing University, Chongqing 400044, China
School of Physics and Electronic Engineering, Chongqing Normal University, Chongqing 401331, China

 

† Corresponding author. E-mail: xuzheng@cqu.edu.cn guopan@cqnu.edu.cn

Project supported by the State Key Development Program for Basic Research of China (Grant No. 2014CB541602), the National Natural Science Foundation of China (Grant Nos. 51677008 and 51707028), and the Fundamental Research Funds of Central Universities, China (Grant No. 106112015CDJXY150003).

Abstract

Low-field nuclear magnetic resonance magnet (2 MHz) is required for rock core analysis. However, due to its low field strength, it is hard to achieve a high uniform B0 field only by using the passive shimming. Therefore, active shimming is necessarily used to further improve uniformity for Halbach magnet. In this work, an equivalent magnetic dipole method is presented for designing shim coils. The minimization of the coil power dissipation is considered as an optimal object to minimize coil heating effect, and the deviation from the target field is selected as a penalty function term. The lsqnonlin optimization toolbox of MATLAB is used to solve the optimization problem. Eight shim coils are obtained in accordance with the contour of the stream function. We simulate each shim coil by ANSYS Maxwell software to verify the validity of the designed coils. Measurement results of the field distribution of these coils are consistent with those of the target fields. The uniformity of the B0 field is improved from 114.2 ppm to 26.9 ppm after using these shim coils.

1. Introduction

Low-field nuclear magnetic resonance (NMR) magnets (2 MHz) are required to reduce the negative effect of paramagnetic impurities in the rock core by using NMR analysis. In recent years, Halbach magnet has become a hot research spot in low-field NMR due to its compactable structure and using no iron yoke(i.e. light in weight).[14] However, due to its low field strength, it is hard to achieve a high uniform B0 field only by using the passive shimming. Therefore, active shimming is necessary to further improve uniformity for Halbach magnet.

The method of improving magnetic field uniformity, that is, shimming, includes passive and active shimming. Active shimming is achieved by using shim coils, which can generate a magnetic field and cancel the non-uniform component of the main magnetic field.

The two methods for designing shim coil are regular separation method and distributed winding method.[5] The former uses a predetermined coil shape as a basic coil unit, and the whole structure is obtained by using an optimization algorithm, such as the conjugate gradient descent algorithm,[6] Levenberg--Marquardt algorithm,[7] simulated annealing method,[8,9] hybrid optimization algorithm,[10] and fuzzy membership function method.[11] The distributed winding method can improve the performance of the coil, although the coil structure designed by this method is based on magnetic field distributed in the region of interest (ROI).[12] The methods included are matrix inversion,[13,14] stream function,[15,16] target field,[17] harmonic coefficient,[18,19] and equivalent magnetic dipole methods.[2023] These methods have been successfully used for shimming the superconductor and permanent magnet and designing RF coils and gradient coil.

Zhao [24] designed cylinder saddle shim coils for Halbach magnet by regular separation method, in which the shim coils are composed of straight and arc wires of a particular size, but the magnetic fields in ROI inevitably have other components, such as the Z and other components produced by Y(Y2 − 3Z2) shim coil. Equivalent magnetic dipole method introduced by Liu[21] can successfully be used for designing the shim coils. But, it is difficult to satisfy the magnetic field constraint condition in the second programming algorithm, and an inappropriate initial solution may cause the solution to non-converge. To avoid this problem, we construct an unconstrained optimization problem by adding magnetic field constraint condition as an appropriate penalty function.

In this work, shim coils are distributed on a cylindrical epoxy resin tube (94 mm in diameter). Figure 1(a) illustrates the schematic of the Halbach magnet and shim coil. The magnet consists of three Halbach rings (each ring is 250 mm in diameter and has 24 magnet bars; the space between neighboring rings is 12 mm). Figure 1(b) depicts the Halbach magnet. The strength of the magnetic field in the ROI (a spherical area with 40 mm in diameter in the center) is 47.89 mT, the direction is along the x axis, and the uniformity is 114.2 ppm after passive shimming. The equivalent magnetic dipole method used for designing the shim coil is proposed in the present work to obtain a uniform magnetic field.

Fig. 1. (color online) Structure of (a) Halbach magnet and shim coils, and (b) complete Halbach magnet.

We expand the main magnetic field by sphere harmonic series before the active shimming[25] and obtain its non-uniform components. We fabricate the X, Y, Z, XY, XZ, YZ, X2Y2, and 2Z2X2Y2 shim coils and complete the corresponding experiment in this work to cancel the non-uniform components. These shim coils are described as follows.

2. Equivalent magnetic dipole method

Current distribution on the cylindrical surface is divided into small discrete elements that can be regarded as magnetic dipoles. Based on current continuity theorem, the stream function that satisfies the condition that the curl is equal to current density on the cylindrical surface is presented. The relationship between target magnetic field and stream function is then established, and the stream function based on an expected magnetic field in the ROI is obtained. We can achieve the winding pattern of shim coil in accordance with the stream function.[26]

2.1. Stream function and equivalent magnetization

In the equivalent magnetic dipole method, the wiring area for shim coil is divided into several curved rectangular sheets. Each sheet is filled with a small rectangular current loop. The small rectangular current can be regarded as a magnetic dipole when its area is sufficiently small. In Fig. 2, each rectangular cambered patch on the cylinder can be considered a magnetic dipole, and the shimming magnetic field is a summation of the magnetic fields produced by these magnetic dipoles.

Fig. 2. Schematic diagram of meshed cylindrical coil.

The key point of this algorithm is to inversely deduce the structure of shim coil in accordance with the given magnetic field distribution. The magnetization of a single dipole is M (r′). If the equivalent magnetizing current circulates in a thin layer (h in thickness), then the equivalent surface current density of the magnetic dipole can be expressed as[20]

where Js satisfies ∇ · Js = 0 and is a two-dimensional (2D) vector defined only on the surface of the cylinder. The stream function (S(r′)) is related to the current density through the following equation:[17]

where n (r′) is the normal vector of the surface-carried current. Magnetic moments of the dipoles and stream function satisfy the following equation:.

The magnetic moments of the dipoles will reveal the stream function, and the contour plot of S(r′) will reveal the winding pattern and provide the locations of discrete wires that carry equal currents as combined with the equivalent magnetic dipole method.

2.2. Calculation of the magnetic field in the ROI

In Fig. 2, if a current is distributed in the h-thickness cylinder continuously, and the current is discretized into Q magnetic dipoles, then the arc length and axial length of each dipole are both a. The area of each dipole is sufficiently small, thus giving a fine subdivision, and the stream function in each small element is a constant. The stream function of the q-th element can be assumed to be Sq. A cylinder is assumed to be split into Qc columns along a circumferential direction and Qr rows along the axis direction. Each element is marked as indicated in Fig. 2.

If a ≪ |rr′|, and ha, then the equivalent magnetic moment induced by a single magnetic dipole can be written as

The magnetic field produced by the equivalent magnetic moment m is[27]

We will obtain the x component of the magnetic field produced by Q magnetic dipoles at points (x, y, z) in the ROI by substituting Eq. (4) into Eq. (5), which is expressed below.

where

with nx, ny, and nz being the x, y, and z components of normal vector nq, respectively.

3. Optimization of coil design

If the magnetic field distribution is set to be the only constraint condition optimal object, then the structure of a shim coil is very complex, and the winding is not smooth. This condition will lead to an unrealizable structure in engineering, and the local temperature will be very high with current following in the coil. The addition of other constraint conditions or optimal objects, such as minimizing inductance and power dissipation, becomes necessary for optimizing the coil structure.[28,29] We select a minimizing power dissipation as the optimal object to minimize the negative effect on the temperature stability of a magnet given coil heating. The power dissipation produced by a single magnetic dipole may be determined as follows:

where ρ is the resistivity of the coil, and Js,z and Js,ϕ are the z-axial and circumferential component of the current density, correspondingly. The currents between adjacent dipoles can be written, respectively, as Sq+1Sq in the z-axis direction and Sq+1Sq in the ϕ-axis direction in accordance with the characteristics of the stream function, and the corresponding current densities can be written as Js,z = (Sq+1Sq)/a and Js,ϕ = (Sq+QcSq)/a.

Power dissipation is produced by the entire shim coil and can be expressed as

In accordance with Eq. (9), a small difference between adjacent stream function values corresponds to a low power dissipation. The optimization model can be constructed by setting the minimizing power dissipation to be the optimal object and target field to be the constraint condition, and expressed as

For the quadratic programming problem, finding a favorable initial value of a solution that satisfies Eq. (10) is difficult. An inappropriate initial solution may lead the solution to be non-convergent. Therefore, the constrained optimization problem in Eq. (10) can be transformed into an unconstrained optimization problem by adding an appropriate penalty function term (as expressed in Eq. (11). In this equation, λ is the penalty parameter,

The second term on the right-hand side of Eq. (11) represents the quadratic sum of the calculated and the target fields. The calculated magnetic field can be obtained by using Eq. (6). The target field is determined by the type of shim coils. An unconstrained optimization problem, such as Eq. (11), can be solved by using an lsqnonlin toolbox in MATLAB software. The toolbox is widely used for calculating the nonlinear optimization problem in Eq. (12) through the least squares method.

where f(x) is the function of independent variable x.

Equation (11) can be solved by transforming this equation into the least squares form. and N is the number of field points selected in the ROI.

We can obtain the optimal value of stream function Sq by using the lsqnonlin toolbox, and the winding structure of the shim coil can be obtained in accordance with the contour line of the stream function. Here, we select the average deviation of the magnetic field (tolerance) as an optimization criterion, which can be expressed as

where B is the magnetic field calculated from Eq. (6), and Btarget is the target field in the ROI. and N is the number of field points selected in the ROI.

The penalty parameter λ for obtaining the optimal solution is obtained by the following steps:

(i) Set initial λ0, λ0 > 0. (ii) Obtain the optimal solution Sq in accordance with Eq. (11). (iii) Substitute Sq into Eq. (6), and calculate Bx through Eq. (12) to achieve uniformity criterion δ. (iv) Set exit condition for optimization as δ < ε, where ε is the uniformity of the magnetic field that is required and set to be 5%. If the uniformity of the magnetic field meets the target conditions, then the calculation process ends, and λ is the optimal parameter; or else, λk+1 = aλk. Repeat steps (ii)–(iv) until the optimal result is obtained.

The parameter sequence λk can be selected adaptively on the basis of the difficulty of minimizing the penalty function at each iteration.[30] We select λk+1 to be only modestly larger than λk when minimizing f(Sq, λk) becomes costly for a certain k such as λk+1 = 2λk. If we find the approximate minimizer of f(Sq, λk) inexpensively, then we could attempt an ambitious reduction, say, λk+1 = 10λk.

4. Shim coil structure and measuring results

Shim coil is located on a cylinder. The cylinder is 94 mm in diameter and 300 mm in length; its ROI is a spherical area that is 40 mm in diameter in the center. Wiring area for shim coil is divided into 100 × 100 curved rectangular sheets, and target points are distributed evenly on spherical surface (40 mm in diameter) at an angle, the total number of target points is 10 × 10. The X, Y, Z, XY, XZ, YZ, X2Y2, and 2Z2X2Y2 shim coils are designed. In accordance with the calculation results, we find that the X shim coil that rotates 45° around the z axis is Y shim coil, XZ shim coil that rotates 45° around the z axis is YZ shim coil, and XY shim coil that rotates 30° is X2Y2 shim coil. All structures of shim coils are demonstrated in Fig. 3 where the dashed and solid lines denote the currents in the opposite directions.

Fig. 3. Structures of shim coils, showing (a) X or Y shim coil, (b) Z shim coil, (c) XY or X2Y2 shim coil, (d) XZ or YZ shim coil, and (e) 2Z2X2Y2 shim coil.

All shim coils are made of a double-sided flexible printed circuit board (PCB). The material of the shim coil is copper (0.07 mm in thickness). The substrate of the shim coil is FR-4 (0.3 mm in thickness). All shim coils are exhibited as shown in Fig. 4.

Fig. 4. (color online) Shim coils made of PCB.

We built a three-dimensional (3D) stepper motor measurement platform as presented in Fig. 5. We use an F.W.Bell8030 Gauss meter to measure the magnetic field produced by each shim coil in the ROI. The DC currents supplied by a DC current source (Agilent 6654A) in each coil is 2 A. The magnetic fields induced by X, Y, Z, X2Y2, XY, YZ, XZ, and 2Z2X2Y2 shim coils are illustrated in Fig. 6. In Table 1 listed are the average deviation for each of all shim coils, and the average deviation δ is less than 5%, except those of X2Y2 and XZ shim coils. The measurement results are consistent with the target fields.

Fig. 5. (color online) System for measuring magnetic field of shim coils.
Fig. 6. (color online) Diagrams of the magnetic field distribution of (a) Y shim coil on ZOY plane, (b) X shim coil on ZOX plane, (c) Z shim coil on XOZ plane, (d) X2Y2 shim coil on XOY plane, (e) XY shim coil on XOY plane, (f) YZ shim coil on ZOY plane, (g) XZ shim coil on ZOX plane, and (h) 2Z2X2Y2 shim coil on YOX plane.
Table 1.

Deviations of magnetic field between designed results and expected target fields.

.

Shim coils are of discretely distributed coil structure shown in Fig. 3. To facilitate adding excitation current, each loop of wire needs to be connected to form a circuit. The extra conductor used to connect adjacent wires will produce other high order components. The second order shim coils need more extra conductors to connect adjacent wires than the first order shim coils, which will produce more high order components, so the average deviation δ is higher.

5. Shimming process and results

The uniformity of the B0 field is beyond the accuracy range of the hall gauss meter (F.W. Bell8030, USA) after passive shimming. Hence, we develop an NMR gauss meter to measure the B0 field. Figure 7 displays the measuring system that is composed of a spectrometer (Magritek Kea2, New Zealand), a radio frequency amplifier (TOMCO, BT00500 ALPHA-S, Australia), and an eight-channel shim current source (Resonance Research Inc., USA).

Fig. 7. (color online) Measurement system for shimming.

A spectral analysis method is used for evaluating the uniformity of the B0 field before and after active shimming. The frequency spectrum can be obtained by applying Fourier transform to Carr–Purcell–Meiboom–Gill (CPMG) echo signals. A full width at half maximum (FWHM) of the frequency spectrum is related to an equivalent transverse relaxation time ; their relationship is[31,32]

where Δf1/2 is the FWHM of the frequency spectrum. The relationship between the equivalent transverse relaxation time () and deviation of the main magnetic field (ΔB0) is

where T2 is the intrinsic transverse relaxation time of the sample, and γ is the gyromagnetic ratio.

In accordance with Eqs. (13) and (14), the B0 is uniform, is extensive, and Δw1/2 is small. Therefore, we use Δw1/2 to evaluate the uniformity of the B0 field. Equation (14) indicates that non-uniformity significantly affects , whereas the intrinsic transverse relaxation time is extensive. A distilled water sample is the option in the present work for measuring the uniformity of the B0 field. The equation for calculating uniformity is

where U is the uniformity of the B0 field, and f0 is the frequency in the center.

Two measurement methods are used in this work to measure the B0 field. The first method is to measure the uniformity of the B0 field on a spherical surface (40 mm in diameter) by using several small sensors, which are composed of five RF coils (40 turns and 5 mm in inner diameter) with H2O samples (water in glass tube, of which the inner diameter is 3 mm) as illustrated in Figs. 8 and 9. The second method is to measure the uniformity of the B0 field in the spherical region (40 mm in diameter) by a big sensor, which contains spherical water samples (40 mm in diameter) as depicted in Fig. 10.

Fig. 8. (color online) Distribution of measuring probes.
Fig. 9. (color online) NMR gauss meter for measurements.
Fig. 10. (color online) Spherical water sample.

We obtain the magnitude of the magnetic field in the ROI based on the frequency spectrum of the CPMG echo signals that are measured by each RF coil. The parameters of the CPMG sequence are given as follows: the width of the 90° and 180° pulses are both 22 μs; the attenuations of the 90° and 180° pulses are −18 dB and −12 dB, respectively; echo time is 105 μs; the dwell time is 20 μs; the number of echoes is 10; the number of scans is 15; and repetition time is 8500 ms. The B0 magnetic field on a sphere (40 mm in diameter) is measured by rotating the NMR Gauss meter as demonstrated in Fig. 9.

The shimming experiment is first accomplished in the order of X, Y, Z, XY, XZ, YZ, X2Y2, and 2Z2X2Y2 in the shimming process. We find that XZ and 2Z2X2Y2 shim coils have better effects than other coils. The required currents in the XZ and 2Z2X2Y2 shim coils are predetermined, and then the currents in the other shim coils are adjusted. The optimal currents in shim coils are listed in Table 2.

Table 2.

Current in each shim coil.

.

The uniformity of the B0 field before and after active shimming are exhibited in Figs. 11 and 12, correspondingly. The corresponding frequency spectra are displayed in Fig. 13, a solid curve represents the result before shimming, whereas the dotted linecurve denotes the result after shimming.

Fig. 11. (color online) Uniformity of B0 field before shimming.
Fig. 12. (color online) Uniformity of B0 field after active shimming.
Fig. 13. (color online) Frequency spectra before and after active shimming.

The results indicate that the uniformity of the B0 field is clearly improved after using shim coils, and the uniformity of the B0 field is improved from 114.2 ppm to 26.9 ppm.

6. Conclusions

In this study, we present an equivalent magnetic dipole method for designing the shim coils in Halbach magnet active shimming. We set minimizing the power dissipation to be the optimal object and magnetic field deviation of shim coils to be the constraint condition. The unconstrained optimization problem is solved by using the lsqnonlin optimization toolbox in MATLAB. Eight shim coils are designed by this method. The uniformity of B0 field is improved from 114.2 ppm to 26.9 ppm after using the eight shim coils.

The proposed method has a disadvantage in practical application, although this method is efficient for designing shim coils. The magnetic field produced by each shim coil contains not only the corresponding magnetic field components but also the components of other orders. For example, the magnetic field produced by XY shim coil contains XZ, X2Y2, and other components. These components still affect the actual shimming and increase the difficulty in shimming, although these components are small. Therefore, designing a shim coil that contains minimal unwanted components is our future work. The increase in harmonic coefficient constraints may be worth considering further for designing the shim coils.

Reference
[1] Windt C W Soltner H Van D D Blümler P 2011 J. Magn. Reson. 208 27
[2] Danieli E Perlo J Blümich B Casanova F 2010 Ange. Chem. 49 4133
[3] Cooley C Z Haskell M W Cauley S F Sappo C Lapierre C D Ha C G Stockmann J P Wald L L 2018 IEEE Trans. Magn. 54 5100112
[4] Tayler M C D Sakellariou D 2017 J. Magn. Reson. 277 143
[5] Turner R 1993 Magn. Reson. Imag. 11 903
[6] Lu H Jesmanowicz A Li S J Hyde J S 2004 Magn. Reson. Med. 51 158
[7] Villa M Savini A Mustarell P 1989 Proceedings of the Annual International Conference of the IEEE Engineering in Medicine and Biology Society November 9–12, 1989 Seattle, WA USA 605 10.1109/IEMBS.1989.95894
[8] Crozier S Moddrell D M 1995 Magn. Reson. Imag. 13 615
[9] Crozier S Moddrell D M 1993 J. Magn. Reson. 103 354
[10] Adamiak K Czaja A J 1994 IEEE Trans. Magn. 30 4311
[11] Sanchez H Liu F Trakic A Weber E Crozier S 2007 IEEE Trans. Magn. 43 3558
[12] Garrett M W 1951 J. Appl. Phys. 22 1091
[13] Compton R A U S Patent 4456881 1984-06-26 http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&p=1&u=%2Fnetahtml%2FPTO%2Fsearch-bool.html&r=32&f=G&l=50&co1=AND&d=PTXT&s1=4456881&OS=4456881&RS=4456881
[14] Wong E Jesmanowicz A Hyde J S 1991 Magn. Reson. Med. 21 39
[15] Schenck J F, Hussain M A and Edelstein W A U S Pantent 4646024 1987-02-24 http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&p=2&u=%2Fnetahtml%2FPTO%2Fsearch-bool.html&r=54&f=G&l=50&co1=AND&d=PTXT&s1=4646024&OS=4646024&RS=4646024
[16] Brideson M A Forbes L K Crozier S 2002 Con. Magn. Reson. 14 9
[17] Turner R 1986 J. Phys. D: Appl. Phys. 19 L147
[18] Liu W T Zu D L Tang X 2010 Chin. Phys. B 19 018701
[19] Xu Y Chen Q Zhang G Pei Z Yang X 2015 Appl. Magn. Reson. 46 823
[20] Lopez H S Liu F Poole M Crozier S 2009 IEEE Trans. Magn. 45 767
[21] Liu W T Casanova F Blumich B 2012 Appl. Magn. Reson. 42 101
[22] Chu X Jiang X H Jiang J G 2005 Pro. CSEE 25 139 in Chinese
[23] Xu Z Li X Guo P Wu J M 2018 Chin. Phys. 27 058702
[24] Zhao W Tang X Y Liu Z W 2010 Trans. Chin. Elec. Soci. 25 6 in Chinese
[25] Anderson W A 1961 Rev. Sci. Instr. 32 241
[26] Brideson M A Forbes L K Crozier S 2002 Con. Magn. Reson. 14 9
[27] Feng C Z 1985 Static electromagnetics Xi’an Xi’an Jiaotong University Press in Chinese
[28] While P T Forbes L K Crozier S 2011 IEEE Trans. Bio. Eng. 58 2418
[29] While P T Korvink J G Shah N J Poole M S 2013 J. Magn. Reson. 235 85
[30] Nocedal J, Wright S J 1999 Numerical Optimization, 2nd edn., p. 419 https://link.springer.com/book/10.1007%2F978-0-387-40065-5
[31] Chen S S Xia T Bi X Miao Z Y Yang P Q Wang H Z Dai S G 2017 Chin. J. Magn. Reson. 34 87
[32] Diehl P Fluck E Kosfeld R 1972 NMR Basic Principles Progress/Grundlagen und Fortschr 7 Berlin, Heidelberg Springer-Verlag 56